import React from 'react';
import {useLocation, useParams, useSearchParams} from "react-router-dom";

const Detail = (props) => {
// params传参
    // const Params=useParams();
//     console.log(Params)
//     Search传参
//     const [Parms]=useSearchParams();
//     console.log(Parms.get("id"))
//     console.log(this)
    const Location=useLocation()
    console.log(Location.state.id)
    return (

        <div>
            detail
        </div>
    );
};

export default Detail;
